#ifndef _game_h_included_
#define _game_h_included_

#include "Header.h"
#include <d3dx9.h>
#include <d3d9.h>
#include <fstream>
#include <iostream>  
#include "DXUtil.h"
#include "Camera.h"
#include "Model.h"
#include "Light.h"
#include "Mesh.h"
#include <vector>
#include "KeyFrame.h"

#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h> // DirectX/Direct Input

using namespace std;

//The basis for the scene.
//Controls updates, drawing and removal or models.
class Game
{
	//Models
	vector<Model*> mModels;
	
	//Lights: Support enabled for multiple light sources.  
	vector<Light*> mLights;
	
	//Camera:  only one camera is supported 
	//			but more could be added;
	Camera* mCamera;

	//Calculates the total time
	double mTotalTime;

	//The identity Matrix
	D3DXMATRIX mIdentity;

public:

	string input;
	//Creates the scene
	void Initialize(LPDIRECT3DDEVICE9 myDevice, LPDIRECT3D9 myDirect3D);

	//All scene specific ini's go here
	void IniScene(LPDIRECT3DDEVICE9 myDevice);
	
	void LoadContent(LPDIRECT3DDEVICE9 myDevice);
	//Updates the scene
	void Update(LPDIRECT3DDEVICE9 d3ddev, double pElapsedTime); 
	//Draws the scene
	void Draw(LPDIRECT3DDEVICE9 d3ddev);

	//Releases all data for the scene.
	void Release();

	D3DVECTOR* DetermineEllipseTangent(D3DVECTOR* circle,D3DVECTOR* point );
};
#endif
